package com.hnluchuan.staff.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import java.util.Date;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import org.springframework.format.annotation.DateTimeFormat;
import com.hnluchuan.staff.model.Employee;

/**
 * 学历
 */
@Entity
@Table(name = "education") 
public class Education extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public Education() {
	}
	
	public Education(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	/**
	 * 员工ID
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee_id")
	private Employee employee;
	/**
	 * 学习起始时间
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "start")
	private Date educastart;
	/**
	 * 学习结束时间
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "end")
	private Date educaend;
	/**
	 * 专业
	 */
	@Column(name = "major")    		
	private String educaMajor;
	/**
	 * 学历
	 */
	@Column(name = "record")    		
	private Integer educarecord;
	/**
	 * 证书
	 */
	@Column(name = "certificate")    		
	private String certificate;
	// fields end

	/** id */
	public Long getId() {
    	return id;
    }
    /** id */
    public void setId(Long id) {
    	this.id = id;
    }
	/** 员工ID */
	public Employee getEmployee() {
    	return employee;
    }
    /** 员工ID */
    public void setEmployee(Employee employee) {
    	this.employee = employee;
    }
	/**起始时间*/
	public Date getEducastart() {return educastart;}

	public void setEducastart(Date educastart) {this.educastart = educastart;}
	/**介绍时间*/
	public Date getEducaend() {return educaend;}

	public void setEducaend(Date educaend) {this.educaend = educaend;}
	/**专业*/
	public String getEducaMajor() {return educaMajor;}

	public void setEducaMajor(String educaMajor) {this.educaMajor = educaMajor;}
	/**学历*/
	public Integer getEducarecord() {return educarecord;}

	public void setEducarecord(Integer educarecord) {this.educarecord = educarecord;}
	/**证书*/
	public String getCertificate() {return certificate;}

	public void setCertificate(String certificate) {this.certificate = certificate;}
}
